package com.ruoyi.info.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 积分流水表对象 fh_info_points_history
 * 
 * @author ruoyi
 * @date 2024-12-XX
 */
public class FhInfoPointsHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 变动积分（正数=增加，负数=减少） */
    @Excel(name = "变动积分")
    private Long changePoints;

    /** 变动前积分 */
    @Excel(name = "变动前积分")
    private Long pointsBefore;

    /** 变动后积分 */
    @Excel(name = "变动后积分")
    private Long pointsAfter;

    /** 操作类型：1=增加，2=减少 */
    @Excel(name = "操作类型", readConverterExp = "1=增加,2=减少")
    private String opType;

    /** 来源类型 */
    @Excel(name = "来源类型")
    private String sourceType;

    /** 来源ID（如任务ID、订单ID等） */
    @Excel(name = "来源ID")
    private Long sourceId;

    /** 备注说明 */
    @Excel(name = "备注说明")
    private String remark;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setChangePoints(Long changePoints) 
    {
        this.changePoints = changePoints;
    }

    public Long getChangePoints() 
    {
        return changePoints;
    }
    public void setPointsBefore(Long pointsBefore) 
    {
        this.pointsBefore = pointsBefore;
    }

    public Long getPointsBefore() 
    {
        return pointsBefore;
    }
    public void setPointsAfter(Long pointsAfter) 
    {
        this.pointsAfter = pointsAfter;
    }

    public Long getPointsAfter() 
    {
        return pointsAfter;
    }
    public void setOpType(String opType) 
    {
        this.opType = opType;
    }

    public String getOpType() 
    {
        return opType;
    }
    public void setSourceType(String sourceType) 
    {
        this.sourceType = sourceType;
    }

    public String getSourceType() 
    {
        return sourceType;
    }
    public void setSourceId(Long sourceId) 
    {
        this.sourceId = sourceId;
    }

    public Long getSourceId() 
    {
        return sourceId;
    }
    public void setRemark(String remark) 
    {
        this.remark = remark;
    }

    public String getRemark() 
    {
        return remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("changePoints", getChangePoints())
            .append("pointsBefore", getPointsBefore())
            .append("pointsAfter", getPointsAfter())
            .append("opType", getOpType())
            .append("sourceType", getSourceType())
            .append("sourceId", getSourceId())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}

